<template>
	<view class="cardstyle">
		<image src="/static/logo.png" style="height: 200rpx;width: 200rpx;"></image>
		<text class="titlebox">{{title}}</text>
		<view class="tipsbox">
			<text style="color: #f00;">置顶</text>
			<text>{{author}}</text>
			<text>{{comments}}评</text>
			<view style="flex: 1; display: flex; justify-content: flex-end;">
				<text>{{time}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "cardViewText",
		data() {
			return {
				
			};
		},
		props: {
			title: {
				type: String,
				default: "新闻标题",
				require: true
			},
			isTop: {
				type: Boolean,
				default: "false",
				require: true
			},
			author: {
				type: String,
				default: "来源",
				require: true
			},
			comments: {
				type: Number,
				default: "0",
				require: true
			},
			time: {
				type: String,
				default: "2025.1.1",
			}
		},
		methods: {

		}
	}
</script>

<style>
.cardstyle {
  /* 示例样式：添加卡片边框和内边距 */
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 15rpx;
  margin: 10rpx 0;
  background-color: #fff;
}

.titlebox {
  /* 标题样式优化 */
  display: block;
  font-size: 32rpx;
  font-weight: bold;
  padding: 10rpx 0;
  margin-bottom: 10rpx;
}

.tipsbox {
  /* 信息区域布局优化 */
  display: flex;
  align-items: center;
  font-size: 26rpx;
  color: #666;
  gap: 15rpx; /* 元素间距 */
}
</style>